﻿{include file="public/header" /}
<form method="post">
    <div class="panel admin-panel">
        <div class="panel-head"><strong>商家 {:input('get.name')} 的桌台{:lang('currency')['list']}</strong>
            <a style="float: right;margin-right: 15px" href="__URL__/?page={:input('get.page')}"><< 返回</a>
        </div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="id"
                   value="{:lang('currency')['all_select']}"/>
            <a type="button" class="button button-small border-green" href="__URL__/desk_edit?seller_id={:input('get.id')}&name={:input('get.name')}&page={:input('get.page')}"/>{:lang('currency')['add']}</a>
            <a id="select_del" type="button" class="button button-small border-red" href="#"/>{:lang('currency')['del']}</a>
        </div>
        <table class="table table-hover">
            <tr>
                <th width="35">{:lang('label')['select']}</th>
                <th width="100">名称</th>
                <th width="100">二维码</th>
                <th width="150">{:lang('label')['handle']}</th>
            </tr>
            {volist name="data" id="desk"}
            <tr>
                <td>
                    <input type="checkbox" name="id" value="{$desk.id}"/>
                </td>
                <td style="line-height:40px">{$desk.title}</td>
                <td style="line-height:40px">
				<img style="width:80px;height:80px;" src="http://qr.liantu.com/api.php?text={$desk.code}"/>
				</td>
                <td style="line-height:40px"><a class="button border-blue button-little" href="__URL__/desk_edit?id={$desk.id}&seller_id={:input('get.id')}&name={:input('get.name')}&page={:input('get.page')}">{:lang('currency')['edit']}</a>
                    <a class="button border-red button-little" href="__URL__/desk_del.html?id={$desk.id}&seller_id={:input('get.id')}&name={:input('get.name')}&page={:input('get.page')}" onclick="if(confirm('{:lang('currency')['del']}?')){return true;}return false;">{:lang('currency')['del']}</a>
                </td>
            </tr>
            {/volist}
        </table>
        {include file="public/pages" /}
    </div>
</form>
<script>
    layer.config({
        extend: 'extend/layer.ext.js'
    });
    $('#select_del').click(function () {
        var str = "";
        $("input:checkbox[name=id]:checked").each(function () {
            str += $(this).val() + ",";
        });
        if (str != '') {
            if (confirm("{:lang('currency')['del']}?"))
            {
                location.href = '__URL__/desk_del.html?id=' + str;
            }
        }
    });
</script>
{include file="public/footer" /}